package com.itheima.zixi3.Mapbianli;

import java.util.HashMap;
import java.util.Map;
import java.util.Set;

public class Jianzhaozhi {
    public static void main(String[] args) {
        Map<String,Double> map=new HashMap<>();
        map.put("张三", 99.9);
        map.put("李四", 98.9);
        map.put("王五", 97.9);
        map.put("赵六", 96.9);
        //获取map集合中的全部键
        Set<String> keys = map.keySet();
        //根据键获取对应的值
        for (String key : keys) {
            Double value = map.get(key);
            System.out.println(key+"---"+value);
        }
    }
}
